From ae93188f0f4f36086622636ba9ae4810cbd1f8c9 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 14 May 2025 00:46:13 -0400
Subject: Move derivation of the synthesized view of channels (and messages)
 into `session`.

---
 ui/routes/(app)/ch/[channel]/+page.svelte | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/routes/(app)/ch/[channel]/+page.svelte')

diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte
index 1130cd4..ea8cca6 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/ch/[channel]/+page.svelte
@@ -11,7 +11,7 @@
   let activeChannel;
 
   const channelId = $derived(page.params.channel);
-  const channel = $derived(session.channels.get(channelId));
+  const channel = $derived(session.channels.find((channel) => channel.id === channelId));
   const messages = $derived(session.messages.filter((message) => message.channel === channelId));
   const unsent = $derived(outbox.messages.filter((message) => message.channel === channelId));
   const deleted = $derived(outbox.deleted.map((message) => message.messageId));
-- 
cgit v1.2.3

